// yb_mingpian/pages/ruzhu/xiangqing.js
var t = getApp(),
  a = t.requirejs("core"),
  s = t.requirejs("wxParse/wxParse");
Page({

  /**
   * 页面的初始数据
   */
  data: {
    orderstatus:'',
    order_no:'',
    receiver_mobile:'',
    reciveaddress:'',
    user_name:'',
    receiver_name:'',
    pay_money:'',
    create_time:'',
    goodsid:[],
    order_id:0,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
    var that=this
    console.log(options.id)
    that.setData({
      order_id: options.id
    })
    that.clickme()
  },
  clickme: function () {
    var o = this
    console.log(o.data.order_id)
     a.get("Card/OrderDetail", {
      orderid: o.data.order_id,
      }, function (res) {
        console.log(res)
        o.setData({
          orderstatus : res.orderDetail.orderstatus
        })
        o.setData({
          order_no : res.orderDetail.order_no
        })
        o.setData({
          receiver_mobile : res.orderDetail.receiver_mobile
        })
        o.setData({
          reciveaddress : res.orderDetail.reciveaddress
        })
        o.setData({
          receiver_name : res.orderDetail.receiver_name
        })
        o.setData({
          pay_money : res.orderDetail.pay_money
        })
        o.setData({
          create_time : res.orderDetail.create_time
        })
        o.setData({
          goodsid : res.orderDetail.goodsid
        })

      })
    },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})